package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.FintechUserBankCard;
import com.appkubes.mall.core.po.FintechUserBankCardExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface FintechUserBankCardMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_bank_card
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechUserBankCardSqlProvider.class, method="countByExample")
    long countByExample(FintechUserBankCardExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_bank_card
     *
     * @mbg.generated
     */
    @DeleteProvider(type=FintechUserBankCardSqlProvider.class, method="deleteByExample")
    int deleteByExample(FintechUserBankCardExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_bank_card
     *
     * @mbg.generated
     */
    @Delete({
        "delete from fintech_user_bank_card",
        "where user_key = #{userKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String userKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_bank_card
     *
     * @mbg.generated
     */
    @Insert({
        "insert into fintech_user_bank_card (user_key, bank_card_number, ",
        "bank_name, bank_phone, ",
        "phone_auth_status, creator, ",
        "create_time, updater, ",
        "update_time, version)",
        "values (#{userKey,jdbcType=VARCHAR}, #{bankCardNumber,jdbcType=VARCHAR}, ",
        "#{bankName,jdbcType=VARCHAR}, #{bankPhone,jdbcType=VARCHAR}, ",
        "#{phoneAuthStatus,jdbcType=TINYINT}, #{creator,jdbcType=VARCHAR}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{updater,jdbcType=VARCHAR}, ",
        "#{updateTime,jdbcType=TIMESTAMP}, #{version,jdbcType=VARCHAR})"
    })
    int insert(FintechUserBankCard record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_bank_card
     *
     * @mbg.generated
     */
    @InsertProvider(type=FintechUserBankCardSqlProvider.class, method="insertSelective")
    int insertSelective(FintechUserBankCard record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_bank_card
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechUserBankCardSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="bank_card_number", property="bankCardNumber", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_name", property="bankName", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_phone", property="bankPhone", jdbcType=JdbcType.VARCHAR),
        @Result(column="phone_auth_status", property="phoneAuthStatus", jdbcType=JdbcType.TINYINT),
        @Result(column="creator", property="creator", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updater", property="updater", jdbcType=JdbcType.VARCHAR),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.VARCHAR)
    })
    List<FintechUserBankCard> selectByExampleWithRowbounds(FintechUserBankCardExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_bank_card
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechUserBankCardSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="bank_card_number", property="bankCardNumber", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_name", property="bankName", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_phone", property="bankPhone", jdbcType=JdbcType.VARCHAR),
        @Result(column="phone_auth_status", property="phoneAuthStatus", jdbcType=JdbcType.TINYINT),
        @Result(column="creator", property="creator", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updater", property="updater", jdbcType=JdbcType.VARCHAR),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.VARCHAR)
    })
    List<FintechUserBankCard> selectByExample(FintechUserBankCardExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_bank_card
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "user_key, bank_card_number, bank_name, bank_phone, phone_auth_status, creator, ",
        "create_time, updater, update_time, version",
        "from fintech_user_bank_card",
        "where user_key = #{userKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="bank_card_number", property="bankCardNumber", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_name", property="bankName", jdbcType=JdbcType.VARCHAR),
        @Result(column="bank_phone", property="bankPhone", jdbcType=JdbcType.VARCHAR),
        @Result(column="phone_auth_status", property="phoneAuthStatus", jdbcType=JdbcType.TINYINT),
        @Result(column="creator", property="creator", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updater", property="updater", jdbcType=JdbcType.VARCHAR),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.VARCHAR)
    })
    FintechUserBankCard selectByPrimaryKey(String userKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_bank_card
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechUserBankCardSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") FintechUserBankCard record, @Param("example") FintechUserBankCardExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_bank_card
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechUserBankCardSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") FintechUserBankCard record, @Param("example") FintechUserBankCardExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_bank_card
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechUserBankCardSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(FintechUserBankCard record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_user_bank_card
     *
     * @mbg.generated
     */
    @Update({
        "update fintech_user_bank_card",
        "set bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},",
          "bank_name = #{bankName,jdbcType=VARCHAR},",
          "bank_phone = #{bankPhone,jdbcType=VARCHAR},",
          "phone_auth_status = #{phoneAuthStatus,jdbcType=TINYINT},",
          "creator = #{creator,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "updater = #{updater,jdbcType=VARCHAR},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP},",
          "version = #{version,jdbcType=VARCHAR}",
        "where user_key = #{userKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(FintechUserBankCard record);
}